﻿using YDT_UserService.Applictions.DTOs;
using YDT_UserService.Domain.Enums;

namespace YDT_UserService.Applictions.Interfaces
{
    /// <summary>
    /// 用户应用服务接口 - 定义用户业务操作
    /// </summary>
    public interface IUserService
    {
        /// <summary>根据ID获取用户</summary>
        Task<UserDto?> GetUserByIdAsync(Guid id);
        /// <summary>根据用户名获取用户</summary>
        Task<UserDto?> GetUserByUserNameAsync(string userName);
        /// <summary>获取所有用户</summary>
        Task<IEnumerable<UserDto>> GetAllUsersAsync();
        /// <summary>根据状态获取用户</summary>
        Task<IEnumerable<UserDto>> GetUsersByStatusAsync(UserStatus status);
        /// <summary>分页查询用户</summary>
        Task<(IEnumerable<UserDto> Users, int TotalCount)> GetPagedUsersAsync(UserQueryDto query);
        /// <summary>创建用户</summary>
        Task<UserDto> CreateUserAsync(CreateUserDto createUserDto);
        /// <summary>更新用户</summary>
        Task<UserDto?> UpdateUserAsync(Guid id, UpdateUserDto updateUserDto);
        /// <summary>删除用户</summary>
        Task<bool> DeleteUserAsync(Guid id);
        /// <summary>修改密码</summary>
        Task<bool> ChangePasswordAsync(Guid id, ChangePasswordDto changePasswordDto);
        /// <summary>用户登录</summary>
        Task<UserDto?> LoginAsync(LoginDto loginDto);
        /// <summary>激活用户</summary>
        Task<UserDto?> ActivateUserAsync(Guid id);
        /// <summary>禁用用户</summary>
        Task<UserDto?> DeactivateUserAsync(Guid id);
    }
}
